﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Credisoft.Models.Helpers;
using Credisoft.Models.Credisoft_BO;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;

namespace Credisoft.Controllers.InitialForm
{
    public class GrantingCreditController : Controller
    {
        //
        // GET: /GrantingCredit/

        public ActionResult GrantingCredit()
        {
            return View();
        }

        /* ======== EJEMPLO DE LLAMADA ======== */
        //public ActionResult startInbox()
        //{
        //    String jsonString = @"{ ""esExtraordinario"" : true }"; // Falta testear lo de las variables
        //    JObject variables = JObject.Parse(jsonString);
        //    String message = BonitaConnector.startProcess(
        //        BonitaConnector.PROCESS_ONE_INBOX_ASSIGNMENT,
        //        BonitaConnector.ID_INSTANTIATE_PROCESS_WITH_VARIABLES,
        //        variables);

        //    ViewBag.Message = message;
        //    return View();
        //}

        [HttpPost]
        public JsonResult insertCreditGrantingS1(CreditGrantingStationBO CreditGranting)
        {
            PruebaConexion pr = new PruebaConexion();
            pr.prueba();
            return new JsonResult() { Data =  CreditGranting};
        }
    }
}
